﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Text.Encodings.Web;

namespace MvcMovie.Controllers
{
    public class HelloWorldController : Controller
    {

        // 
        // GET: /HelloWorld/
        public IActionResult Index()
        {
            return View();
        }
        // 
        // GET: /HelloWorld/Welcome/ 

        public  IActionResult Welcome (string name, int id = 1)
        {
            ViewData["Message"] = "Hello" + name;
            ViewData["id"] = id;
            //return HtmlEncoder.Default.Encode($"Hello {name}, ID: {ID}");
            return View();
        }
        // 
        // GET: /HelloWorld/Welcome2/ 
        public string Welcome2()
        {
            return "This is the Welcome2 action method...";

        }

    }
}
